package com.graduation.community_manager.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author wdh
 */
@RestControllerAdvice
public class MyExceptionHandler {
    @ExceptionHandler(RuntimeException.class)
    public ResultData handler(RuntimeException e){
        return ResultData.fail(e.getMessage(),null);
    }
}
